<template>
	<a-modal
    title='留言&查看'
    :visible="visible"
    @ok="handleOk" 
    @cancel="handleCancel"
    >
    	<span  class='color-grey'>留言信息：</span>{{form.message}} <br><br>
    	<span  class='color-grey'>上传材料：</span>
    	<ul>
    		<li  v-for='(item,index) in form.fileVOList'  :key='index'>
    			<a-icon type="paper-clip" />{{item.name}} 
    			<a-icon type="download"  class='fr cursor' @click='downloadFile(item.code)'/>
    		</li>
    	</ul>	
	</a-modal>
</template>

<script >
import { getDetail_of_customerMsg }  from  '@/api/system/index'
export default {
	name:'customer_of_oliviaModal',
	props:{
      visible:{
        type:Boolean,
        default:false
      },
    },
    data(){
    	return {
    		 form:{}
    	}
    },
    methods:{
    	handleOk(){
    		this.$emit('handleOk')
    	},
		handleCancel(){
			this.$emit('handleOk')
		}
    },
    mounted(){
	    this.$nextTick(()=>{
	      	this.$on('openDialog',function(code){
	      		getDetail_of_customerMsg(code).then((res)=>{
	      			if(res.data.flag == true){
	      				this.form = res.data.data
	      			}
	      		})
	      	})
	  	})
	}
}
</script>

<style scoped="scoped">

</style>